package com.zhiyou.app.controller;


import com.zhiyou.app.common.constant.CommonConstant;
import com.zhiyou.app.common.vo.resp.Response;
import com.zhiyou.app.pojo.vo.dict.IdColorItem;
import com.zhiyou.app.pojo.vo.dict.IdSizeGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/dict")
@Api(tags = "字典管理")
public class DictController {
    @ApiOperation(value = "获取尺寸字典")
    @GetMapping("/getDictIdSizeGroup")
    public Response<List<IdSizeGroup>> getDictIdSizeGroup() {
        List<IdSizeGroup> idSizeGroupList = CommonConstant.ID_SIZE_GROUP_LIST;
        return Response.successWithData(idSizeGroupList);
    }

    @ApiOperation(value = "获取颜色字典")
    @GetMapping("/getDictIdColor")
    public Response<List<IdColorItem>> getDictIdColor() {
        List<IdColorItem> idColorItems = CommonConstant.ID_COLOR_LIST;
        return Response.successWithData(idColorItems);
    }
}
